”hdoj_ mine! algorithm stepped8pp“ 的搜索结果

HDOJ 1042 N!(大数)

标签:   Java

     HDACM1042import java.math.BigInteger; import java.util.Scanner;public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){

     题目说明待求阶乘的数最大为10000,而10000!的位数为35660(这个数是上网查的),所以已经有的数据类型无法表示. 思路:用int型数组存储n!的每一步计算结果,并且数组大小应该不小于35660这个数....

HDOJ_1004

标签:   算法  HDOJ

     HDOJ_1004 Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges’ favorite time is guessing the most popular problem. When the...

     #include<stdio.h> #include<string.h> int main(){ int i,n,len; scanf("%d",&n); char str[100]; getchar();...

     #include<stdio.h> #include<math.h> int main() { int a,m,n,i,j,k,s,flag,time; while(scanf("%d %d",&m,&n)!=EOF){ ... for(a=m,fla...

     #include<stdio.h> int main() { int n; while(scanf("%d",&n)!=EOF){ int a; int sum=1; //跳出一个循环免得值重复 while(n--){ scanf("%d"... ...

     #include<stdio.h> #include<math.h> int main() { double x1,y1,x2,y2; while(scanf("%lf %lf %lf %lf",&x1,&...,sqrt((x2-x1)*(x2-x1)...

     #include<iostream> #include<string.h> using namespace std; int main(){ int n,count; char str[1000]; scanf("%d",&...

     题目:http://acm.hdu.edu.cn/showproblem.php?pid=1010 题目大意:给出一个迷宫(含起点和终点),要求找出一条路径,这条路径的长度必须为某个规定的长度. ... ...在理解迷宫问题的基础上,再做本题....

     题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2025   //C++代码 #include #include #include using namespace std; int main(){ char a[105],ch; while(cin.getline(a,105)){ ... ch=a

     題目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1003题目大意,给定一个数组,a[0], a[1], ..., a[n-1]需要求它的一个连续子序列,使得这个连续子序列的和最大.一、暴力求解方法O(n^3)直观的解法是,遍历所有...

HDOJ 1042 N!

标签:   HDOJ  1042  N

     N! Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 75189 Accepted Submission(s): 21920 Total Submission(s): 75189 Accepted Submis

     题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2019   //C++代码 #include using namespace std; int main(){ int n,m,a,i; while(cin>>n>>m,n||m){ bool flag=0; for(i=1;i;...f

     N! Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 64180 Accepted Submission(s): 18255 Problem Description ...Given an integer N(0

     #include<iostream> #include<cstring> using namespace std; int main(){ char str[101]; while(gets(str)){ for(int i = 0;i <... if(i == 0||str[i-...

10  
9  
8  
7  
6  
5  
4  
3  
2  
1